package org.example.schoolbus.service.impl;
import org.example.schoolbus.mapper.QueryMapper;
import org.example.schoolbus.service.QueryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
@Service
public class QueryServiceimpl implements QueryService {
    @Autowired
    private QueryMapper querymapper;
    @Override
    public List<Map<String,Object>> sQueryUser(String station_name)
    {//当输入站点名称时
        if(querymapper.sQueryUser(station_name)!=null)
        {
            return querymapper.sQueryUser(station_name);
        }
        else
            return null;
    }
    @Override
    public List<Map<String,Object>>rQueryUser(String route_name)
    {//当输入路线名称时
        if(querymapper.rQueryUser(route_name)!=null)
        {
            return querymapper.rQueryUser(route_name);
        }
        else
            return null;
    }

}
